package base;

import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;

public class InputStreamDemo {

    public static void main(String[] args) throws IOException {
        try (BufferedReader is = new BufferedReader(
                new InputStreamReader(Files.newInputStream(Paths.get("D:\\gitee2\\learn-java\\Dockerfile"))))) {
            String line;
            while ((line = is.readLine()) != null) {
                System.out.println(line);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
